<?php

class SJB_Classifieds_GetTree extends SJB_Function
{
	public function execute()
	{
		$oTreeHelper = new SJB_TreeHelper('listing');
		$oTreeHelper->init();

		/**
		 * @author still
		 * DISPLAY AS SELECT BOXES
		 */
		if ($oTreeHelper->get_displayAsSelectBoxes()) {
			$oTreeHelper->getDisplayAsSelectBoxes();
		}
		/*
		 * DISPLAY AS TREE
		 * OLD VARIANT
		 */
		else
		{
			//	$tree_values = SJB_ListingFieldTreeManager::getTreeValuesBySID($fieldSID);
			$oTreeHelper->getDisplayAsTree();
		}

		exit();
	}
}